<template>
	<view class="px-28 bg-ff">
		<x-vip-detail :ids="idindex" :dataList="dataList"  />
		<view class="mt-20 mb-40" v-if="idindex==1" @click="goBack">
			<x-vip-card :bool='false'  />
		</view>
		<view class="mt-20 mb-40" v-if="idindex==2" @click="goBack">
			<x-vip-card :bool='false' bgimg="/goodsPage/static/doct/jinsevip.png" mony="1030"
				img1="/goodsPage/static/doct/jinsefenx.png" img2="/goodsPage/static/doct/jinsezhek.png"
				img3="/goodsPage/static/doct/jinsetuig.png" viptitle="金卡会员"
				vipimglogo="/goodsPage/static/doct/jinselogo.png" />
		</view>
		<view class="mt-20 mb-40" v-if="idindex==3"  @click="goBack">
			<x-vip-card :bool='false' bgimg="/goodsPage/static/doct/hongsevip.png" mony="10330"
				img1="/goodsPage/static/doct/hongsefenx.png" img2="/goodsPage/static/doct/hongsezhek.png"
				img3="/goodsPage/static/doct/hongsetuig.png" viptitle="钻石会员"
				vipimglogo="/goodsPage/static/doct/hongselogo.png" />
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				// 卡片的id vip会员 黄金会员等
				user_level_setting_id: '',
				idindex: '',
				// 分享  复购等
				// id  0分像收益  1复购折扣  2推广升级
				// id: '', //
				dataList: []
			}
		},

		onLoad(option) {
			if (option) {
				this.user_level_setting_id = option.cardid;
				this.idindex = option.idindex;
			}
		},
		onShow() {
			let param={}
			param.level_detail_ids=this.user_level_setting_id
			this.$https("doctindex.leveldetail", param, '', '', {
				"content-type": "application/x-www-form-urlencoded"
			}).then(res => {
				this.dataList = res.data;

			})
		},
		methods: {
			goBack(){
				this.$store.commit("getCategory", '1')
				uni.setStorage({
					key: 'category',
					data: '1',
					success: function() {
						uni.navigateTo({
							url: 'pages/index/category'
						})
					}
				})
			},
		}
	}
</script>

<style>

</style>
